package com.zyh.alpacaDemo.order.pojo;


import java.time.ZonedDateTime;

/**
 * @Classname OrderResponse
 * @Description TODO()
 * @Date 2025-09-01 21:04
 * @Created by 86177
 */
public class OrderResponse {
    private String id;

    @com.fasterxml.jackson.annotation.JsonProperty("client_order_id")
    private String clientOrderId;

    @com.fasterxml.jackson.annotation.JsonProperty("created_at")
    private ZonedDateTime createdAt;

    @com.fasterxml.jackson.annotation.JsonProperty("updated_at")
    private ZonedDateTime updatedAt;

    private String symbol;
    private String side;
    private String type;

    @com.fasterxml.jackson.annotation.JsonProperty("time_in_force")
    private String timeInForce;

    private String qty;
    private String notional;

    @com.fasterxml.jackson.annotation.JsonProperty("limit_price")
    private String limitPrice;

    private String status;

    @com.fasterxml.jackson.annotation.JsonProperty("filled_qty")
    private String filledQty;

    @com.fasterxml.jackson.annotation.JsonProperty("filled_avg_price")
    private String filledAvgPrice;

    // Getter方法
    public String getId() { return id; }
    public String getStatus() { return status; }
    public String getSymbol() { return symbol; }
    public String getSide() { return side; }
    public String getQty() { return qty; }
    public String getFilledQty() { return filledQty; }
    public String getFilledAvgPrice() { return filledAvgPrice; }

    @Override
    public String toString() {
        return "Order ID: " + id + "\n" +
                "Status: " + status + "\n" +
                "Symbol: " + symbol + "\n" +
                "Side: " + side + "\n" +
                "Quantity: " + qty + "\n" +
                "Filled: " + filledQty + "\n" +
                "Average Price: " + filledAvgPrice;
    }
}
